package com.ruicar.afs.cloud.afscase.common.feign;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.common.core.feign.AfsFeignFormSupport;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @description: 阿里巴巴智能语音
 * @author: mingzhi.li
 * @date: 2020/8/13 21:11
 */
@FeignClient(name = "conversion", url = "${com.greatwall.systems.conversion-system.url}", configuration = AfsFeignFormSupport.class)
public interface IntelligentVoiceFeign {

    /**
     * 获取任务id
     * @param json
     * @param headers
     * @return
     */
    @ApiModelProperty(value = "获取任务id")
    @PostMapping(value = "/stream/v1/filetrans")
    public String getTaskId(@RequestBody JSONObject json, @RequestHeader Map<String, String> headers);

    /**
     * 获取转文本内容
     * @param json
     * @param headers
     * @return
     */
    @ApiModelProperty(value = "获取转文本内容")
    @GetMapping(value = "/stream/v1/filetrans")
    public String getMessageInfo(@RequestParam JSONObject json , @RequestHeader Map<String, String> headers);
}
